﻿(function () {
    var resumeFactory = function ($http, $q) {
        var factory = {};
        
        factory.getResume = function (id) {
            var defered = $q.defer();

            $http({
                method: 'GET',
                url: '/api/Resume/' + id
            }).success(function (data, status, headers, config) {
                //$log.info(data, status, headers(), config);
                defered.resolve(data);
            }).error(function (data, status, headers, config) {
                //$log.warn(data, status, headers(), config);
                defered.reject(status);
            });
            return defered.promise;
        };

        
        return factory;
    };

    resumeFactory.$inject = ['$http', '$q'];
    angular.module('app').factory('resumeFactory', resumeFactory);
}());